package com.github.jlib.javafx.samples.systemtray;

import javafx.application.Application;
import static javafx.application.Application.launch;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;


public class MainApp extends Application {

    private static final String title = "JavaFX示例";
    private static final String icon = "/images/paypal.png";

    @Override
    public void start(Stage stage) throws Exception {
        Scene scene = new Scene(FXMLLoader.load(getClass().getResource("/fxml/Scene.fxml")));
        scene.getStylesheets().add("/styles/Styles.css");
        stage.setScene(scene);

        FxSystemTray.create(stage, title, icon);

        stage.setTitle(title);
        stage.getIcons().add(new Image(icon));
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }

}
